﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<DTO.Models.MEDIA>>" %>
<div class="dung-section">
    <div class="dung-section-border">
    </div>
    <div class=" dung-section-title">
        CÁC HOẠT ĐỘNG ĐÃ THỰC HIỆN</div>
    <div class=" dung-section-content">
        <div class="hoatdongslide" style="height:250px">
        <% 
            int index = 0;
            string domaincms = ConfigurationManager.AppSettings["domaincms"];
        %>
        <% foreach (var item in Model)
           {%>
        <% if (index % 2 == 0)
           {%>
            <% if (index == 0)
               {%>
            <div class="hoatdongline otherline<%= index == 0 ? 1 : index %>">
            <%} else { %>
            <div class="hoatdongline otherline<%= index == 0 ? 1 : index %>" style="display:none">
            <%} %>
            <div class="dung-col2 dung-left">
        <%}
           else
           {%>
           <div class="dung-col2 dung-right">
        <%} %>
            <div class="dung-border" style="height:220px">
                <div class="img news" style="float: left; margin-right: 10px">
                    <a href="/Hoatdong/Detail/<%= item.MediaID %>?typeMediaName=Hoatdong&pageIndex=-1">
                        <img title="<%= item.Title %>" alt="<%= item.Title %>" src="<%= Html.Encode(domaincms + "/MediaImage/" + item.ID.ToString() + ".jpg") %>"
                            width="120px" height="100px" />
                    </a>
                </div>
                <p class="headline">
                    <span><b><%= Html.ActionLink(item.Title, "Detail", "Hoatdong", new { ID = item.MediaID, typeMediaName = "Hoatdong", pageIndex = "-1" }, null)%></b></span>
                </p>
                <p class="summary"><%= Html.Encode(item.Intro)%></p>
                <p class="clearer">&nbsp;</p>
            </div>
        </div>
        
        <% if (index % 2 == 1)
           {%>
        </div>
        <div class="clearer">
            &nbsp;</div>
        <%} %>
        <%
            index += 1;
           }%>
        <% if (index % 2 == 1)
           {%>
        </div>
        <div class="clearer">
            &nbsp;</div>
        <%} %>
        </div>
        <div class="dung-text-right"><a href="<%= Url.Content("~/Hoatdong") %>">Xem thêm</a></div>
    </div>
</div>
